From 780bc573f81bfdf2158c08ebeb56879ec575ba4f Mon Sep 17 00:00:00 2001 From: "cl349@arcadians.cl.cam.ac.uk" Date: Fri, 19 Nov 2004 16:38:51 +0000 Subject: [PATCH] bitkeeper revision 1.1159.182.1 (419e219b-NEt5mNzRdSAn_QT6BQ4ZA) Move definition of direct_remap_area_pages from pgalloc.h to pgtable.h, next to io_remap_page_range. --- linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c | 10 +++++----- .../include/asm-xen/asm-i386/pgalloc.h | 11 ----------- .../include/asm-xen/asm-i386/pgtable.h | 11 +++++++++++ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c b/linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c index 25df669389..d6973d3c31 100644 --- a/linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c +++ b/linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c @@ -26,7 +26,6 @@ #include #include -#include #ifdef CONFIG_IA64 # include @@ -44,10 +43,10 @@ extern void tapechar_init(void); static inline int uncached_access(struct file *file, unsigned long addr) { #ifdef CONFIG_XEN - if (file->f_flags & O_SYNC) - return 1; - /* Xen sets correct MTRR type on non-RAM for us. */ - return 0; + if (file->f_flags & O_SYNC) + return 1; + /* Xen sets correct MTRR type on non-RAM for us. */ + return 0; #elif defined(__i386__) /* * On the PPro and successors, the MTRRs are used to set @@ -215,6 +214,7 @@ static int mmap_mem(struct file * file, struct vm_area_struct * vma) vma->vm_page_prot)) return -EAGAIN; #else + /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */ if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, diff --git a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgalloc.h b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgalloc.h index c98a6d2933..752a069e8d 100644 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgalloc.h +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgalloc.h @@ -53,15 +53,4 @@ extern void pte_free(struct page *pte); #define check_pgt_cache() do { } while (0) -int direct_remap_area_pages(struct mm_struct *mm, - unsigned long address, - unsigned long machine_addr, - unsigned long size, - pgprot_t prot, - domid_t domid); -int __direct_remap_area_pages(struct mm_struct *mm, - unsigned long address, - unsigned long size, - mmu_update_t *v); - #endif /* _I386_PGALLOC_H */ diff --git a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable.h b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable.h index db97836850..8e1be8b21b 100644 --- a/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable.h +++ b/linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable.h @@ -490,6 +490,17 @@ static inline unsigned long arbitrary_virt_to_phys(void *va) #define io_remap_page_range(vma,from,phys,size,prot) \ direct_remap_area_pages(vma->vm_mm,from,phys,size,prot,DOMID_IO) +int direct_remap_area_pages(struct mm_struct *mm, + unsigned long address, + unsigned long machine_addr, + unsigned long size, + pgprot_t prot, + domid_t domid); +int __direct_remap_area_pages(struct mm_struct *mm, + unsigned long address, + unsigned long size, + mmu_update_t *v); + #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR -- 2.30.2